﻿@{
    ViewData["Title"] = "Viper";
}

<div class="text-center">
    <h1 class="display-4">Welcome AnnoDemo</h1>
    <p>Learn about <a href="https://github.com/duyanming/dymDemo">Anno  with ASP.NET Core</a>.</p>
    <p>Anno 是一个微服务快速开发框架，底层通讯可以随意切换 grpc、thrift。自带服务发现、调用链追踪、Cron 调度、限流、事件总线、CQRS 、DDD、类似MVC的开发体验，插件化开发。.  Anno is a microservices rapid development framework, the underlying communication can be arbitrary switch GRPC, thrift.Built-in service discovery, call chain tracking, Cron scheduling, current limiting, event bus, CQRS, DDD, similar MVC development experience, plug-in development.</p>
</div>
<div style="width:100%">
    <textarea style="width:44%; height:280px;" id="input">
{
    "channel": "anno.component",
    "router": "UserInfo",
    "method": "HelloWorld",
    "name":".net love java"
}

</textarea>
    <input type="button" value="发送请求" send />
    <textarea style="width:44%;height:280px;" id="output">

    </textarea>
</div>
<script src="~/js/jquery.min.js"></script>
<script src="~/js/base.js"></script>
<script type="text/javascript">
    $(function () {
        $("input[send]").click(function () {
            $("#output").val();

            var inputJson = {};
            try {
                inputJson = JSON.parse($("#input").val());
            } catch (ex) {
                $("#output").val(ex);
            }
            bif.process(inputJson, function (data, status) {
                $("#output").val(JSON.stringify(data));
            }, function (data, status) {
                $("#output").val(JSON.stringify(data));
            });
        });
    });
</script>